home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / Xpm / lib / xpm-3.2g / README < prev   
Text File  |  1994-08-01  |  6KB  |  172 lines

  1. ** Copyright 1990-93 GROUPE BULL -- See license conditions in file COPYRIGHT **
  2.  
  3.                 XPM Version 3
  4.  
  5. WHAT IS XPM?
  6. ============
  7.  
  8. XPM (X PixMap) is a format for storing/retrieving X pixmaps to/from files.
  9.  
  10. Here is provided a library containing a set of four functions, similar to the
  11. X bitmap functions as defined in the Xlib: XpmCreatePixmapFromData,
  12. XpmCreateDataFromPixmap, XpmReadFileToPixmap and XpmWriteFileFromPixmap for
  13. respectively including, storing, reading and writing this format, plus four
  14. other: XpmCreateImageFromData, XpmCreateDataFromImage, XpmReadFileToImage and
  15. XpmWriteFileFromImage for working with images instead of pixmaps.
  16.  
  17. This new version provides a C includable format, defaults for different types
  18. of display: monochrome/color/grayscale, hotspot coordinates and symbol names
  19. for colors for overriding default colors when creating the pixmap. It provides
  20. a mechanism for storing information while reading a file which is re-used
  21. while writing. This way comments, default colors and symbol names aren't lost.
  22. It also handles "transparent pixels" by returning a shape mask in addition to
  23. the created pixmap.
  24.  
  25. See the XPM Manual for more details.
  26.  
  27. HOW TO GET XPM?
  28. ===============
  29.  
  30. New xpm updates are announced on the comp.windows.x newsgroup, and on the
  31. "xpm-talk" list. All new "official" xpm releases can be found by ftp on:
  32.  
  33.     export.lcs.mit.edu (18.30.0.238) contrib     (Boston, USA)
  34.     avahi.inria.fr     (192.5.60.47) pub     (Sophia Antipolis, France)
  35.  
  36.  
  37. DOCUMENTATION:
  38. =============
  39.  
  40. Old users might read the CHANGES file for a history of changes interesting
  41. the user.
  42.  
  43. Read the doc. The documentation is in PostScript format (file doc/xpm.ps) and
  44. has been produced with FrameMaker. The source files are available on request.
  45.  
  46.  
  47. INSTALLATION:
  48. ============
  49.  
  50. To obtain the XPM library, first uncompress and untar the compressed tar file
  51. in an approriate directory.
  52.  
  53. Then you can either compile xpm via "imake" or in a stand-alone way.
  54.  
  55. WITH IMAKE:
  56.  
  57.     Imakefiles are provided to build both shared and unshared libraries.
  58.     You should know how to use imake to build the XPM Makefiles,
  59.     by executing "xmkmf" then do:
  60.  
  61.         make Makefiles
  62.         make depend        (if you want to)
  63.         make
  64.  
  65.     which will build the XPM library and the sxpm application. 
  66.     Then do:
  67.  
  68.              make install
  69.         make install.man
  70.  
  71.     which will install the library and the sxpm man page.
  72.  
  73.     If it fails, you may edit the Imakefiles to add compilation flags to
  74.     suit your machine.
  75.  
  76. WITHOUT IMAKE:
  77.  
  78.     To compile xpm, in the xpm directory you just created, do:
  79.  
  80.             make -f Makefile.noXtree
  81.  
  82.     Then to install it, do:
  83.  
  84.         make -f Makefile.noXtree install
  85.  
  86. SXPM:
  87. ====
  88.  
  89. In addition to the library the sxpm tool is provided to show XPM file and
  90. convert them from XPM2 to XPM version 3. If you have previously done 'make' or
  91. 'make all' you should have it yet, otherwise just do:
  92.  
  93.               cd sxpm; make
  94.  
  95. This application shows you most of the features of XPM and its source can be
  96. used to quickly see how to use the provided functions
  97.  
  98. By executing 'sxpm -?' you will get the usage.
  99.  
  100. Executing 'sxpm -plaid' will show a demo of the XpmCreatePixmapFromData
  101. function. The pixmap is created from the static variable plaid defined in the
  102. sxpm.c file. Sxpm will end when you press the key Q in the created window.
  103.  
  104. Executing 'sxpm -plaid -s lines_in_mix blue' will show the feature of
  105. overriding color symbols giving a colorname, and executing 'sxpm -p
  106. lines_in_mix 1' will show overriding giving a pixel value.
  107.  
  108. Then you should try 'sxpm -plaid -o output' to get an output file using the
  109. XpmWriteFileFromPixmap function.
  110.  
  111. You can now try 'sxpm -plaid -o - -nod -rgb /usr/lib/X11/rgb.txt' to directly
  112. get the pixmap printed out on the standard output with colornames instead of
  113. rgb values.
  114.  
  115. Then you should try 'sxpm plaid.xpm' to use the XpmReadFileToPixmap function,
  116. and 'cat plaid_mask.xpm|sxpm' to see how "transparent pixels" are handled.
  117.  
  118. The XpmCreatePixmapFromData function is on purpose called without any Xpminfo 
  119. pointer to show the utility of this one. Indeed, compare the color section of
  120. the two files foo and bar obtained from 'sxpm -nod -plaid -o foo' and 
  121. 'sxpm -nod plaid.xpm -o bar'.
  122.  
  123. To end look at plaid_ext.xpm and try "sxpm -nod plaid_ext.xpm -v" to see how
  124. extensions are handled.
  125.  
  126. Of course, other combinations are allowed and should be tried. Thus, 'sxpm
  127. plaid.xpm -o output -nod' will show you how to convert a file from XPM2 to a
  128. XPM version 3 using sxpm.
  129.  
  130. See the manual page for more detail.
  131.  
  132. CONVERTERS:
  133. ==========
  134.  
  135. In the converters directory you can find different converters about XPM.
  136. There is a perl script xpm1to3.pl to convert XPM1 format file to XPM version
  137. 3. And there are files to build the converters ppmtoxpm and xpmtoppm; to get
  138. instructions about how to build them you should read the corresponding
  139. ppm.README file.
  140.  
  141. KNOWN BUG:
  142. =========
  143.  
  144. If two symbols get the same color pixel when reading a pixmap, one will be
  145. lost when writting it out.
  146.  
  147. DISCUSSION:
  148. ==========
  149.  
  150. There is a mailing list to discuss about XPM which is xpm-talk@sophia.inria.fr.
  151. Any request to subscribe should be sent to xpm-talk-request@sophia.inria.fr.
  152.  
  153. COPYRIGHT:
  154. ==========
  155.  
  156.   Copyright 1990-93 GROUPE BULL --
  157.   See license conditions in the COPYRIGHT file of the XPM distribution
  158.  
  159. Please mail any bug reports or modifications done, comments, suggestions,
  160. requests for updates or patches to port on another machine to:
  161.  
  162. lehors@sophia.inria.fr        (INTERNET)
  163.  
  164. 33 (FRANCE) 93.65.77.71        (VOICE PHONE)
  165.  
  166. Arnaud Le Hors            (SURFACE MAIL)
  167. Bull c/o Inria BP. 109
  168. 2004, Route des lucioles
  169. Sophia Antipolis
  170. 06561 Valbonne Cedex
  171. FRANCE
  172.